package com.hwy.struts.service.impl;

import java.util.List;

import com.hwy.struts.dao.CustomerDao;
import com.hwy.struts.dao.impl.CustomerDaoImpl;
import com.hwy.struts.domain.Customer;
import com.hwy.struts.service.CustomerService;

public class CustomerServiceImpl implements CustomerService {

	@Override
	public List<Customer> findAll() {
		CustomerDao cDao = new CustomerDaoImpl();
		List<Customer> allCustomer = cDao.findAll();
		return allCustomer;
	}

	// 客户的新增方法
	@Override
	public void save(Customer customer) {
		CustomerDao cDao = new CustomerDaoImpl();
		cDao.save(customer);
	}

	@Override
	public void del(Long cust_id) {
		CustomerDao cDao = new CustomerDaoImpl();
		cDao.del(cust_id);
	}

}
